import request from '@/utils/request'

export function addAdminPermission(data) {
  return request({
    url: '/sys-service/inner-api/sys/admin-permission',
    data: data,
    method: 'post'
  })
}

export function delAdminPermission(id) {
  return request({
    url: '/sys-service/inner-api/sys/admin-permission/' + id,
    method: 'delete'
  })
}

export function updateAdminPermission(data) {
  return request({
    url: '/sys-service/inner-api/sys/admin-permission',
    data: data,
    method: 'put'
  })
}

export function getAdminPermission(id) {
  return request({
    url: '/sys-service/inner-api/sys/admin-permission/' + id,
    method: 'get'
  })
}

export function treeAdminPermission() {
  return request({
    url: '/sys-service/inner-api/sys/admin-permission/tree',
    method: 'get'
  })
}

